<?php
$id = $_GET["id"];
$sqlObjectUrl = "SELECT url, id, type, site  FROM object_url WHERE id = $id";
$sqlPage = "SELECT name, pic_small, pic_big, pic_square, pic, pic_large, page_url, type, website, has_added_app, founded, company_overview, mission, products, location, parking, public_transit, hours  FROM page WHERE page_id = $id";
$facebook = MyFacebook::getInstance();
$uid = $facebook->getUser();
echo "<h1>Il mio uid: $uid</h1>";
$arrayCall = array(
"method" => "fql.multiquery",
"queries" => array("objecturl" => $sqlObjectUrl,"pagine" => $sqlPage)
);
try {
  $query = $facebook->api($arrayCall);
  if ($query) {
    
    echo "<code>";
    echo "<pre>".print_r($query, true)."</pre>";
    echo "</code>";
  } else {
    echo "<p>Query non eseguita</p>";
  }
} catch (FacebookApiException $e) {
  echo "ERRORE: ".$e;
}
?>
<p>Documentazione Tabelle utilizzate:
<ul>
<li><a target="_blank" href="http://developers.facebook.com/docs/reference/fql/object_url">Tabella Oggetti</a></li>
<li><a target="_blank" href="http://developers.facebook.com/docs/reference/fql/page">Tabella Pagine</a></li>
</ul>
</p>